package com.zxa.simplefactory;

public class Client {

    public static void main(String[] args) {
	// write your code here
        System.out.println("1.Apple");
        Fruit fruit1 = FruitFactory.getFruit("Apple");
        System.out.printf("调用say()方法:");
        fruit1.say();
        System.out.println("2.Banana");
        Fruit fruit2 = FruitFactory.getFruit("Banana");
        System.out.printf("调用say()方法:");
        fruit2.say();
        System.out.println("3.Orange");
        Fruit fruit3 = FruitFactory.getFruit("Orange");
        System.out.printf("调用say()方法:");
        fruit3.say();
        System.out.println("4.peach");
        Fruit fruit4 = FruitFactory.getFruit("peach");
        // fruit4.say();
    }
}
